Encoding method and apparatus, and decoding method and apparatus

ABSTRACT

In an encoding apparatus ( 10 ), a code table group exchange judgment unit ( 12 ) selects a group of code tables from a plurality of groups of code tables according to the property such as tonality of a spectrum signal D 11 , and a quantization unit ( 15 ) encodes quantization coefficients using a code table included in the selected group. Then, a multiplexer ( 18 ) multiplexes a group index D 12  together with coefficient data D 17 . Furthermore, in case resources for an encoder is small, and sound quality may have to be somewhat degraded so as to realize practical encoding speed, a code table number change judgment unit ( 17 ) changes or reduces the number of code tables to be used.

This application is the national phase under 35 U.S.C. 371 of PCTInternational No. PCT/JP03/05546, which has an International filing,date of Apr. 30, 2003 which claims priority based on a Japan ApplicationNo. 2002-132189 filed on May 7, 2002.

BACKGROUND OF THE INVENTION

The present invention relates to an encoding method and apparatus, adecoding method and apparatus, a program, and a recording medium, inparticular, to an encoding method and apparatus for encoding digitaldata of acoustic signals or sound signals with high efficiency totransmit thus encoded data or record thus encoded data to a recordingmedium, to a decoding method and apparatus for receiving or reproducingencoded data to decode thus received or reproduced encoded data, to aprogram for making a computer carry out the encoding processing and thedecoding processing, and to a recording medium having recorded thereinthe program which can be read out by a computer.

This application claims priority of Japanese Patent Application No.2002-132189, filed on May 7, 2002, the entirety of which is incorporatedby reference herein.

Conventionally, as methods for encoding audio signals of sound signals,etc. with high efficiency, there are known non-blocking frequency banddivision systems, such as the band division encoding (subband coding),and blocking frequency band division systems, such as the conversionencoding.

In the non-blocking frequency band division systems, an audio signal ontime base are divided into a plurality of frequency bands withoutblocking the signal, and thus divided signal is encoded. On the otherhand, in the blocking frequency band division systems, a signal on timebase is converted to a signal on frequency base (spectrum conversion),and thus converted signal is divided into a plurality of frequencybands. Then, coefficients obtained through the spectrum conversion areput together according to predetermined respective frequency bands, andthus divided signal is encoded in respective bands.

Furthermore, as a method to improve efficiency of encoding, there issuggested a high-efficient encoding method which jointly introduces thenon-blocking frequency band division system and the blocking frequencyband division system. Employing this method, after performing banddivision employing band division encoding, a signal divided intorespective bands is converted to a signal on frequency base throughspectrum conversion, and thus converted signal is encoded in therespective bands.

In performing frequency band division, the QMF (Quadrature MirrorFilter) may be used in many cases since signals can be processed simplyand aliasing distortions can be removed. Details of frequency banddivision by the QMF are written in “1976R. E. Crochiere, Digital codingof speech in subbands, Bell Syst. Tech.J.Vol.55, No.8 1976”.

Furthermore, as a method to perform band division, there is known thePQF (Polyphase Quadrature Filter) which is a filter division method withequalized bandwidths. Details of the PQF are written in “ICASSP 83BOSTON, Polyphase Quadrature Filters—A new subband coding technique,Joseph H. Rothweiler”.

On the other hand, as above-described spectrum conversion, for example,an input audio signal is blocked using a frame of predetermined unittime, and the signal on time base is converted to a signal on frequencybase by undergoing the DFT (Discrete Fourier Transformation), DCT(Discrete Cosine Transformation), MDCT (Modified Discrete CosineTransformation) in respective blocks.

Details of the MDCT are written in “ICASSP 1987, Subband/TransformCoding Using Filter Bank Designs Based on Time Domain AliasingCancellation, J. P. Prince, A. B. Bradley, Univ. of Surrey RoyalMelbourne Inst. of Tech.”

By quantizing a signal divided into respective bands which is obtainedthrough the filter and spectrum conversion, bands which raisequantization noise can be controlled, which enables high-efficientencoding in auditory sense by utilizing property of masking effect, etc.Furthermore, prior to quantization, signal components of respectivebands are normalized by the maximum of absolute values of signalcomponents of each band, which enables more high-efficient encoding.

Bandwidths of respective frequency bands in performing band division aredetermined in view of human auditory property. That is, in general, anaudio signal may be divided into a plurality of bands (for example, 32bands) under critical bands in which higher bands are of broaderbandwidth.

In encoding data in respective bands, bit allocation is performed toallocate predetermined bits or adaptable bits to respective bands. Thatis, in encoding coefficient data, obtained through the MDCT processing,by employing bit allocation, the numbers of bits are adaptably allocatedto MDCT coefficient data of respective bands that are obtained byperforming the MDCT processing for a signal blocked into respectiveblocks.

As bit allocation methods, there are known a method of performing bitallocation based on signal amount of respective bands (properly referredto as a first bit allocation method, hereinafter), and a method ofperforming bit allocation fixedly, in which signal-to-noise ratiosnecessary for respective bands are obtained by utilizing auditorymasking (properly referred to as a second bit allocation method,hereinafter).

Details of the first bit allocation method are written in “AdaptiveTransform Coding of Speech Signals, R. Zelinski and P. Noll, IEEETransactions of Accoustics, Speech and Signal Processing, vol.ASSP-25,No.4, August 1977”.

Details of the second bit allocation method are written in “ICASSP 1980,The critical band coder digital encoding of the perceptual requirementsof the auditory system, M. A. Kransner MIT”.

Employing the first bit allocation method, quantization noise spectrumsare planarized, minimizing noise energy. However, since masking effectis not utilized in auditory sense, actual auditory noise level is notoptimized. On the other hand, employing the second bit allocationmethod, in case energy is concentrated on a specific frequency, forexample, even though a sinusoidal wave is input, since bit allocation isperformed fixedly, desirable property value cannot be obtained.

So, there is suggested a high-efficient encoding apparatus which dividesentire bits, which are to be used in bit allocation, into bits for fixedbit allocation patterns which are determined in advance for respectivesmall blocks and bits for bit allocation which depend on signal amountof respective blocks, and causes the division ration to depend on asignal related with an input signal. That is, for example, whenspectrums of a signal are smooth, division proportion for the fixed bitallocation patterns is enhanced.

Employing this method, in case energy is concentrated on a specificspectrum when inputting a sinusoidal wave, many bits are allocated to ablock including the spectrum, which can improve the wholesignal-to-noise ratio significantly. In general, since human auditory isextremely sensitive to a signal having a steep spectrum component,above-described improvement of signal-to-noise ratio not only improvesmeasurement numerical value but also improves quality of sound inauditory sense effectively.

As methods of bit allocation, there are suggested many other methodsother than above-described methods, and models concerning auditory arebecoming refined. Improvement in operational capability of an encodingapparatus enables high-efficient encoding from an auditory point ofview.

In case of employing the DFT or the DCT as a method to convert awaveform signal to spectrums, when converting the signal using timeblocks composed of M sets of samples, M sets of independent real numberdata can be obtained. Generally, in order to reduce connectiondistortions between time blocks (frames), each block is overlapped withboth neighbouring blocks by predetermined M1 sets of samplesrespectively. Thus, when employing an encoding method utilizing the DFTor the DCT, M sets of real number data are quantized to be encoded for(M-M1) sets of samples on the average.

In case of employing the MDCT as a method to convert a signal on timebase to spectrums, M sets of independent real number data can beobtained from 2M sets of samples with each block overlapped with bothneighbouring blocks by M sets of samples respectively. Thus, in thiscase, M sets of real number data are quantized to be encoded for M setsof samples on the average. Then, a decoding apparatus regenerate awaveform signal from codes obtained in above-described method thatutilizes the MDCT by adding waveform components obtained from respectiveblocks through inverse conversion with the respective waveformcomponents interfering with each other.

In general, by making time blocks (frames) for conversion longer,frequency resolution of spectrums is enhanced and energy is concentratedon a specific spectrum component. In case of using the MDCT, in which asignal is converted using long blocks with each block overlapped withboth neighbouring blocks by half and the number of obtained spectrumsdoes not increase from the number of original time samples, it becomespossible to realize high-efficient encoding as compared with the caseusing the DFT or the DCT. Furthermore, by making adjacent blocks haveproperly long overlaps, distortions between blocks of a waveform signalcan be reduced.

In generating an actual code sequence, firstly, quantization accuracyinformation indicative of a quantization step used to performquantization and normalization coefficient information indicative of acoefficient used to normalize respective signal components are encodedwith predetermined number of bits for respective bands in whichnormalization and quantization are to be performed. Then normalized andquantized spectrums are encoded.

There is written a high-efficient encoding method in “IDO/IEC11172-3:1993(E), 1993”, in which the numbers of bits indicative ofquantization accuracy information are set to be different from band toband. According to the method, it is prescribed that higher bands aresmall in the number of bits indicative of quantization accuracyinformation.

In encoding spectrums, there is known the variable codeword lengthcoding method such as the Huffman coding. Details of the Huffman codingare written in “David A. Huffman, “A Method for the Construction ofMinimum—Redundancy Codes”, Proceedings of the I.R.E., pp1098-1101,September 1952”.

In general, it becomes possible to improve compression efficiency ofspectrums when plural kinds of code tables are prepared and propertables are employed by exchanging them, as compared with the caseemploying a single Huffman code table alone, since optimum code tablescan be used for various input signals.

However, in case of encoding code table indexes indicative of used codetables in respective quantization units, the number of encoding bits ofthe indexes is undesirably increased since the number of code tables isincreased.

For example, it is assumed that the number of quantization units is 16,and indexes are encoded in respective quantization units. In case thenumber of code tables is 4 (2 bits), the number of encoding bits of theindexes is 32 (=2 bits×16 units). On the other hand, in case the numberof code tables is 8 (3 bits), the number of encoding bits of the indexesis undesirably increased to be 48 (=3 bits×16 units). Thus, in case thetotal number of bits is fixed, the number of bits to encode spectruminformation is decreased by 16 (48 bits−32 bits). There is raised noproblem in case compression ratio is enhanced by more than a valuecorresponding to 16 bits due to increase of the number of code tables,while in case compression ratio is not enhanced, the whole compressionratio is undesirably lowered.

That is, in case the number of code tables is increased, compressionratio of spectrum information itself is enhanced, while the wholecompression ratio is not necessarily enhanced since the number ofencoding bits of indexes of code tables is increased.

SUMMARY OF THE INVENTION

Accordingly, the present invention has an object to overcome theabove-mentioned drawbacks of the prior art by providing an encodingmethod and apparatus, a decoding method and apparatus for receiving orreproducing encoded data to decode thus received or reproduced encodeddata, a program for making a computer carry out the encoding processingand the decoding processing, and a recording medium having recordedtherein the program which can be read out by a computer, which canselect optimum code tables according to signal property of various inputsignals without lowering the whole compression ratio.

The above object can be attained by providing an encoding method andapparatus for encoding a digital signal using a single code table inrespective predetermined units, which selects a single group of codetables from a plurality of groups of code tables classified in advanceaccording to the property of the digital signal, determines a singlecode table from a group of code tables selected in the selectionprocessing, and encodes the digital signal using a code table determinedin the determination processing.

In selecting a single group of code tables, a group of code tables isselected according to tonality of the digital signal.

Also, the above object can be attained by providing an encoding methodand apparatus for encoding a digital signal using a single code table inrespective predetermined units, which sets up the number of selectablecode tables included in a group of code tables, selects a single codetable from a group of code tables, and encodes the digital signal usinga code table selected in the selection processing.

Also, the above object can be attained by providing a decoding methodand apparatus for decoding a digital signal that has been encoded usinga single code table in respective predetermined units, which selects asingle group of code tables to be used from a plurality of groups ofcode tables classified in advance, determines a single code table to beused from a group of code tables selected in the selection processing,and decodes the digital signal using a code table determined in thedetermination processing.

In selecting a single group of code tables, a group of code tables,being the same as what has been selected according to tonality of thedigital signal in encoding the digital signal, is selected.

Also, the above object can be attained by providing a decoding methodand apparatus for decoding a digital signal that has been encoded usinga single code table in respective predetermined units, which sets up thenumber of code tables included in a group of code tables, selects asingle code table from a group of code tables, and decodes the digitalsignal based on a code table selected in the selection processing.

Also the above object can be attained by providing a program for makinga computer carry out above-described encoding processing and decodingprocessing, and a recording medium having recorded therein the programwhich can be read out by a computer.

These objects and other objects, features and advantages of the presentinvention will become more apparent from the following detaileddescription of the preferred embodiments of the present invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A shows a spectrum of a tone type signal, while FIG. 1B shows aspectrum of a noise type signal.

FIG. 2 shows a view for explaining a specific example of encoding a tonetype signal spectrum.

FIG. 3 shows a view for explaining a specific example of encoding anoise type signal spectrum.

FIG. 4 shows the numbers of encoding bits of indexes and spectrum in thecase in which conventional code tables are used.

FIG. 5 shows the numbers of encoding bits of indexes and spectrum in thecase in which code tables employing the present invention are used.

FIG. 6 shows an example of selection probabilities of respective codetables.

FIG. 7 shows the numbers of encoding bits of indexes and spectrum in thecase in which the Huffman coding is employed in encoding indexes of codetables.

FIG. 8 shows the numbers of encoding bits of indexes and spectrum in thecase in which the Huffman coding is employed in encoding indexes of codetables and the number of code tables is 4.

FIG. 9 shows a block diagram of the encoding apparatus according to thepresent invention.

FIG. 10 shows a block diagram of the decoding apparatus according to thepresent invention.

DETAILED DESCRIPTION OF THE PRESENTLY PREFERRED EMBODIMENTS

The present invention will further be described below concerning thebest modes for carrying out the present invention with reference to theaccompanying drawings. The present invention is adapted to the followingembodiments of the encoding method and apparatus for encoding digitaldata of audio signals with high efficiency to transmit thus encoded dataor record thus encoded data to a recording medium, and of the decodingmethod and apparatus for receiving or reproducing encoded data to decodethus received or reproduced encoded data. Firstly, basic principle ofthe present invention will be explained, and then the encoding apparatusand the decoding apparatus employing the present invention will beexplained.

In general, acoustic signals (audio signals) can be classified broadlyinto two signal patterns, that is, signals of tone type and those ofnoise type. FIG. 1A shows a spectrum of a tone type signal, while FIG.1B shows a spectrum of a noise type signal. As can be seen from FIG. 1Aand FIG. 1B, since forms of spectrums or signals that have undergonefrequency conversion are widely different between a tone type signal anda noise type signal, appearance probabilities of quantizationcoefficients are also widely different between them.

In case of a tone type signal, since the probability that quantizationcoefficients (spectrum coefficients after quantization) become “0” ishigh, a Huffman code of short codeword length such as “1” bit areallocated to codes corresponding to “0”, which can realize highcompression ratio. On the other hand, in case of a noise type signal,since respective values of a quantized spectrum appear withapproximately similar probabilities, it is desirable that Huffman codesof similar codeword length be allocated to the respective values.

Table 1 and Table 2 show examples of Huffman code tables for a tone typesignal and a noise type signal, respectively. In the followingexplanation, values of quantization coefficients range from −3 to +3.

TABLE 1 Values of quantized spectrum Huffman codes codeword lengths −31110 4 −2 1100 4 −1 100 3 0 0 1 1 101 3 2 1101 4 3 1111 4

TABLE 2 Values of quantized spectrum Huffman codes codeword lengths −3110 3 −2 100 3 −1 010 3 0 00 2 1 011 3 2 101 3 3 111 3

FIG. 2 shows a view for explaining a specific example of encoding a tonetype signal spectrum using the code tables shown in Table 1 and Table 2.As shown in FIG. 2, quantization coefficients appear with values of 0,0, 3, −2, 0, 0, 0, 0 in this order. When encoding the values using thecode table for a tone type signal shown in Table 1, codeword lengths ofencoded values come into 1, 1, 4, 4, 1, 1, 1, 1 in this order, and thesum thereof comes into 14 bits. On the other hand, when encoding thevalues using the code table for a noise type signal shown in Table 2,codeword lengths of encoded values come into 2, 2, 3, 3, 2, 2, 2, 2 inthis order, and the sum thereof comes into 18 bits. That is, whenencoding a tone type signal spectrum, in case of using the code tablefor a tone type signal, encoding can be performed with smaller number ofbits, in this case smaller by 4 bits, as compared with the case usingthe code table for a noise type signal.

Similarly, FIG. 3 shows a view for explaining a specific example ofencoding a noise type signal spectrum using the code tables shown inTable 1 and Table 2. As shown in FIG. 3, quantization coefficientsappear with values of 3, 3, −1, 2, −3, −2, 3, 2 in this order. Whenencoding the values using the code table for a tone type signal shown inTable 1, codeword lengths of encoded values come into 4, 4, 3, 4, 4, 4,4, 4 in this order, and the sum thereof comes into 31 bits. On the otherhand, when encoding the values using the code table for a noise typesignal shown in Table 2, codeword lengths of encoded values come into 3,3, 3, 3, 3, 3, 3, 3 in this order, and the sum thereof comes into 24bits. That is, when encoding a noise type signal spectrum, in case ofusing the code table for a noise type signal, encoding can be performedwith smaller number of bits, in this case smaller by 7 bits, as comparedwith the case using the code table for a tone type signal.

Thus, in encoding quantization coefficients using Huffman code tables,high compression ratio can be realized by not using a common code tablefor all input signals but by using optimum code tables from previouslyprepared code tables according to signal property, such as tone type ornoise type, of various input signals.

In general, as for acoustic signals, there can be seen few cases inwhich tone type signal components and noise type signal components aremicroscopically mixed up in respective bands. In most cases, signals inall bands are of tone type or of noise type all together, or tone typeand noise type change at low frequency bands and at high frequencybands.

In this embodiment, as will be explained hereinafter, both groups ofcode tables for a tone type signal and groups of code tables for a noisetype signal are prepared, and proper tables are employed by exchangingthem according to signal property of various input signals so as toimprove encoding efficiency.

For example, it is assumed that the number of quantization units is 16.In the conventional method, since code tables are not exchanged, whenthe number of code tables is 8, the number of bits to encode indexes ofthe code tables comes into 48 (3×16). On the other hand, when 8 codetables for a tone type signal and 8 code tables for a noise type signalare prepared respectively and the tables are exchanged in respectivebands, since the number of exchange bit is “1” and the number ofencoding bits of the code tables is 48, the sum comes into 49. In thelatter case, even though the number of bits is increased by “1” ascompared with the case in which code tables are not exchanged, since thenumber of the code tables is substantially doubled, compression ratio ofspectrum information is enhanced and thus the whole compression ratio isimproved.

Specifically, the numbers of encoding bits etc. in the case in whichconventional code tables are used and the numbers of encoding bits etc.in the case employing the present invention in which code tables areclassified into those for a tone type signal and those for a noise typesignal and any of the tables is selected to be used are compared usingFIG. 4 and FIG. 5.

FIG. 4 shows the numbers of encoding bits etc. in the case in whichconventional code tables are used. In this example, indexes of the codetables for respective quantization units are selected from 0 to 7, thatis 8 (3 bits) in all, and the numbers of bits of spectrums encoded usingthe code tables are shown. Since respective code tables are shown by 3bits and the number of quantization units is 16, the sum of the numbersof bits of the code tables comes into 48. The sum of the numbers ofencoding bits of the spectrums comes into 663. Thus, the total sum ofthese bits comes into 711.

FIG. 5 shows the numbers of encoding bits etc. in the case employing thepresent invention in which code tables are classified into groups ofthose for a tone type signal and groups of those for a noise type signaland any of the tables is selected to be used. In this example, 8 codetables for a tone type signal and 8 code tables for a noise type signalare prepared respectively. Since indexes of the code tables are shown by3 bits from 0 to 7, the sum of the numbers of bits of the code tablescomes into 48. On the other hand, exchange bit of “1” bit is required toexchange code tables according to tone type and noise type. So, the sumof the numbers of encoding bits of the code tables comes into 49. Thesum of the numbers of encoding bits of the spectrums using code tablesfor a tone type signal comes into 640, and the sum of the numbers ofencoding bits of the spectrums using code tables for a noise type signalcomes into 682. Thus, in this case, spectrums can be compressedefficiently when code tables for a tone type signal are used. When codetables for a tone type signal are used, the total sum of these bitscomes into 689 which number is smaller than that of the case shown inFIG. 4 by 22 bits. By reallocating the 22 bits to spectrums, soundquality can be further improved.

As can be seen from FIG. 5, the sum of the numbers of encoding bits ofthe spectrums becomes small as compared with the case shown in FIG. 4.This is because the number of code tables is increased and varioussignals can be coped with accordingly, and compression efficiency ofspectrums can be improved.

The probabilities under which respective code tables are actuallyselected, which depend on also the manner of learning of the codetables, are not equal and unequally distribute. By employing variablecodeword length coding adaptable to the unequal distribution, indexes ofcode tables can also be encoded efficiently.

FIG. 6 shows an example of selection probabilities of respective codetables. As can be seen from FIG. 6, selection probabilities ofrespective code tables are not equal. Table 3 shows an example ofvariable codes that is formed in view of the unequal distribution sothat encoding efficiently of indexes is optimized. The code tables shownin Table 3 are optimized for a tone type signal.

TABLE 3 Indexes of code tables variable codes codeword lengths 0 00 2 101 2 2 100 3 3 101 3 4 1100 4 5 1101 4 6 1110 4 7 1111 4

FIG. 7 shows the numbers of encoding bits etc. in the case employing thevariable codes shown in Table 3, which corresponds to the embodimentshown in FIG. 5. As can be seen from FIG. 7, by employing the variablecodes in encoding the indexes of the code tables, the number of encodingbits of the indexes of the code tables comes into 40 which number issmaller than that of the case shown FIG. 5 by 8 bits. By reallocatingthe 8 bits to spectrums, sound quality can be further improved.

In case of a hardware apparatus, etc., since resources for an encoder issmall, sound quality may have to be somewhat degraded so as to realizepractical coding speed. In this case, as will be explained hereinafter,high speed encoding can be realized by reducing the number of codetables that are to be actually used in encoding. The number of codetables should be reduced not simply but so that code tables of highselection probability are left intact, which can suppress deteriorationof encoding efficiency. This set-up operation may be performed by theuser of an encoder, or may be performed by the encoder side by judgingthe state of resources for an encoder or processing speed thereof.

Specifically, the case using 4 code tables will be explained. In case ofthe selection probabilities shown in FIG. 6, since 4 code tables withhigher probabilities occupy 80% of the whole, 80% of spectrums can beencoded without lowering compression ratio.

Furthermore, since the number of code tables is reduced to be 4, thenumber of encoding bits to encode indexes of code tables can also bereduced as compared with the case using 8 code tables. Table 4 shows anexample of variable codes for indexes of Huffman code tables using 4code tables.

TABLE 4 Indexes of code tables variable codes codeword lengths 0 0 1 110 2 2 110 3 3 111 3

FIG. 8 shows the numbers of encoding bits etc. in the case employing thevariable codes shown in Table 4, which corresponds to the embodimentshown in FIG. 7. Since the number of code tables is 4, the quantizationunits 3, 5, 6, 8 cannot select code tables which encode spectrums withthe least number of bits, and thus the number of encoding bits ofspectrums is somewhat increased. On the other hand, since 4 code tableswith higher probabilities are used and the 4 code tables occupy 80% ofthe whole as shown in FIG. 6, these situations occupy 20% of the whole.

Furthermore, since the number of code tables itself is reduced, it isexpected that the number of bits to encode indexes of code tables willbe reduced. In the example shown in FIG. 8, the number of encoding bitsof indexes of code tables comes into 30 which number is smaller thanthat of the case shown in FIG. 7 by 10 bits.

In above-described embodiment, in case the number of code tables forencoding processing is changed from 8 to 4, 4 code tables with higherprobabilities are selected. On the other hand, the selection manner isnot restricted to this, and code tables to be selected may be determinedby the encoding side and the decoding side in advance.

Next, the configuration of the encoding apparatus and the decodingapparatus employing the present invention will be explained. FIG. 9shows a block diagram of an encoding apparatus 10 according to thepresent invention, which includes a spectrum conversion unit 11, a codetable group exchange judgment unit 12, a normalization unit 13, aquantization accuracy decision unit 14, a quantization unit 15, a codetable index encoding unit 16, a code table number change judgment unit17, and a multiplexer 18.

The spectrum conversion unit 11 receives an audio signal D10 to beencoded, and performs spectrum conversion such as the MDCT (ModifiedDiscrete Cosine Transformation) for the audio signal D10 to convert thesignal on time base to a spectrum signal D11 on frequency base. Then,the spectrum conversion unit 11 sends the spectrum signal D11 to thecode table group exchange judgment unit 12, to the normalization unit13, and to the quantization accuracy decision unit 14 for respectivepredetermined time blocks (frames).

The code table group exchange judgment unit 12 selects a group of codetables from a plurality of groups of code tables according to theproperty such as tonality of the spectrum signal D11 sent from thespectrum conversion unit 11, and sends a group index D12 indicative ofthus selected group to the quantization unit 15 as well as to themultiplexer 18.

For example, as described above, in case code tables are classified intogroups of those for a tone type signal and groups of those for a noisetype signal, the code table group exchange judgment unit 12 checkstonality of the spectrum signal D11, and selects a code table for a tonetype signal when the tonality is larger than a predetermined threshold,while selecting a code table for a noise type signal when the tonalityis smaller than the threshold. Then, the code table group exchangejudgment unit 12 sends the group index D12 indicative of the selectedgroup to the quantization unit 15 as well as to the multiplexer 18 as“1” bit information for respective channels. On the other hand,judgement of tone type or noise type may be performed for respectivedivided frequency bands independently to send “1” bit information forthe respective bands as the group index D12.

The normalization unit 13 extracts a signal component of maximumabsolute value from respective signal components constituting thespectrum signal D11, and sets a coefficient corresponding to thusextracted signal component to be a normalization coefficient D14. Then,the normalization unit 13 normalizes or divides the respective signalcomponents constituting the spectrum signal D11 using a valuecorresponding to the normalization coefficient D14. Thus, in this case,normalized data D13 obtained through the normalization ranges from −1.0to 1.0. The normalization unit 13 sends the normalized data D13 to thequantization unit 15, while sending the normalization coefficient D14 tothe multiplexer 18. The normalization unit 13 may send the normalizationcoefficient D14 to the multiplexer 18 after performing predeterminedencoding processing for the normalization coefficient D14 if necessary.

The quantization accuracy decision unit 14 decides a quantization stepto be used in quantizing the normalized data D13 based on the spectrumsignal D11 sent from the spectrum conversion unit 11. Then, thequantization accuracy decision unit 14 sends quantization accuracyinformation D15 corresponding to thus decided quantization step to thequantization unit 15 as well as to the multiplexer 18. The quantizationaccuracy decision unit 14 may send the quantization accuracy informationD15 to the multiplexer 18 after performing predetermined encodingprocessing for the quantization accuracy information D15 if necessary.

The quantization unit 15 quantizes the normalized data D13 using thequantization step corresponding to the quantization accuracy informationD15 sent from the quantization accuracy decision unit 14. Then, thequantization unit 15 encodes quantization coefficients using a codetable of the selected group based on the group index D12 sent from thecode table group exchange judgment unit 12. Specifically, quantizationcoefficients are encoded actually using code tables of the selectedgroup, then a code table which requires the least number of bits isdetermined as the code table to be used for encoding. The quantizationunit 15 sends a code table index D16 of thus determined code table tothe code table index encoding unit 16, while sending encoded coefficientdata D17 to the multiplexer 18.

The code table index encoding unit 16 encodes the code table index D16sent from the quantization unit 15, and sends encoded code table indexD18 to the multiplexer 18. As has been described hereinbefore, whenencoding indexes of code tables, the number of encoding bits can bereduced in case of employing the variable codeword length codingaccording to selection probabilities of respective code tables ascompared with the case employing the fixed codeword length coding. Thus,in this case, the code table index encoding unit 16 sends encoding bitnumber information D19 of indexes of code tables to the quantizationunit 15. Thus, the quantization unit 15 can reallocate the number ofbits gained through encoding of indexes to spectrums.

The code table number change judgment unit 17 changes the number of codetables to be used out of the number of code tables included in theselected group, and sends a code table number index D21 to thequantization unit 15, to the code table index encoding unit 16, and tothe multiplexer 18 for respective frames or respective bit streams as“1” bit information. As has been described above, in case resources foran encoder is small, and sound quality may have to be somewhat degradedso as to realize practical encoding speed, high speed encoding can berealized by reducing the number of code tables that are to be actuallyused for encoding. The number of code tables to be used may be changedbased on a predetermined setting signal D20 sent from outside byjudgment of the user or an apparatus itself, or other methods may beemployed.

For example, as described above, in case of changing the number of codetables to be used from 8 to 4, the code table number change judgmentunit 17 sends the code table number index D21 of “1” bit to thequantization unit 15, to the code table index encoding unit 16, and tothe multiplexer 18. The quantization unit 15 actually performs encodingusing predetermined 4 code tables out of 8 code tables, then determinesa code table which requires the least number of bits as the code tableused for encoding. The quantization unit 15 sends the code table indexD16 of the determined code table to the code table index encoding unit16. On the other hand, the code table index encoding unit 16 rearrangesindexes of the predetermined 4 code tables, and encodes new indexescorresponding to the code table index D16 sent from the quantizationunit 15.

The multiplexer 18 multiplexes the coefficient data D17 sent from thequantization unit 15 together with the group index D12, normalizationcoefficient D14, quantization accuracy information D15, code table indexD18, and code table number index D21. Then, the multiplexer 18 transmitsencoded data D22 obtained through multiplex processing via atransmission line, or records the encoded data D22 to a recordingmedium, not shown.

In the example, the code table group exchange judgment unit 12 checkstonality of the spectrum signal D11 to select either of a code table fora tone type signal or a code table for a noise type signal. On the otherhand, the selection manner is not restricted to this. That is, requirednumber of bits may be calculated by actually performing encoding usingboth code tables to select a group with smaller number of bits.

FIG. 10 shows a block diagram of a decoding apparatus 30 according tothe present invention for decoding encoded data output from the encodingapparatus 10. As shown in FIG.10, the decoding apparatus 30 includes ademultiplexer 31, a code table index decoding unit 32, a dequantizationunit 33, an inverse-normalization unit 34, and a spectruminverse-conversion unit 35.

The demultiplexer 31 decodes and demultiplexes input encoded data D30into coefficient data D31, quantization accuracy information D32,normalization coefficient D33, group index D34, code table index D35,and code table number index D36. The demultiplexer 31 sends thecoefficient data D31 to the dequantization unit 33, and sends thequantization accuracy information D32 and the normalization coefficientD33 to the dequantization unit 33 and to the inverse-normalization unit34, respectively, after performing decoding processing for those data ifnecessary. Furthermore, the demultiplexer 31 sends the group index D34and the code table index D35 to the dequantization unit 33 and to thecode table index decoding unit 32, respectively. Yet, furthermore, thedemultiplexer 31 sends the code table number index D36 to the code tableindex decoding unit 32 as well as to the dequantization unit 33.

The code table index decoding unit 32 decodes the code table index D35based on the code table number index D36, and sends thus decoded indexD37 to the dequantization unit 33.

The dequantization unit 33 determines a code table to be used based onthe group index D34, code table number index D36, and index D37 sentfrom the code table index decoding unit 32, and decodes the coefficientdata D31 using thus determined code table. Then, the dequantization unit33 dequantizes obtained quantization coefficients using a quantizationstep corresponding to the quantization accuracy information D32 sentfrom the demultiplexer 31 to generate normalized data D38. Thedequantization unit 33 sends the normalized data D38 to theinverse-normalization unit 34.

The inverse-normalization unit 34 decodes the normalized data D38 bymultiplying the normalized data D38 by a value corresponding to thenormalization coefficient D33 sent from the demultiplexer 31, and sendsthus obtained spectrum signal D39 to the spectrum inverse-conversionunit 35.

The spectrum inverse-conversion unit 35 performs spectruminverse-conversion such as the IMDCT (Inverse Modified Discrete CosineTransformation) for the spectrum signal D39 sent from theinverse-normalization unit 34 to restore an original audio signal D40.

As in the above, the encoding apparatus 10 in above-describedembodiments selects a group of code tables from a plurality of groups ofcode tables according to the property such as tonality of the spectrumsignal D11, and encodes quantization coefficients using a code tableincluded in the selected group. Thus, optimum code tables can beselected according to signal property of various input signals withoutincreasing the number of encoding bits to encode indexes of code tables.Furthermore, in case resources for an encoder is small, and soundquality may have to be somewhat degraded so as to realize practicalencoding speed, the encoding apparatus 10 can realize high speedencoding by reducing the number of code tables that are to be actuallyused for encoding.

On the other hand, the decoding apparatus 30 in above-describedembodiments selects a code table corresponding to that of the encodingside based on the group index D34, code table index D35, and code tablenumber index D36, which are included in the encoded data D30, to decodethe coefficient data D31.

The invention is not limited to above-described embodiments, but variousmodifications, alternative constructions or equivalents can beimplemented without departing from the scope and spirit of the presentinvention.

For example, above-described embodiments are explained using hardwareconfiguration. On the other hand, the present invention is not limitedthe configuration, and arbitrary processing may be carried out by a CPU(Central Processing Unit) using a computer program. In this case, thecomputer program may be provided using a recording medium, or may beprovided through the internet or other transmission media.

While the invention has been described in accordance with certainpreferred embodiments thereof illustrated in the accompanying drawingsand described in the above description in detail, it should beunderstood by those ordinarily skilled in the art that the invention isnot limited to the embodiments, but various modifications, alternativeconstructions or equivalents can be implemented without departing fromthe scope and spirit of the present invention as set forth and definedby the appended claims.

Industrial Applicability

As in the above, according to the present invention, optimum code tablescan be selected according to signal property, such as tonality, ofvarious input signals without increasing the number of encoding bits toencode indexes of the code tables.

1. An encoding method for encoding a digital signal using a single codetable in respective predetermined units, comprising the steps of:providing a plurality of code tables classified into groups; identifyinga property of the digital signal; a selection step of selecting a singlegroup of code tables from said plurality of groups of code tablesaccording to the property of the digital signal; a determination step ofdetermining a single code table from said single group of code tablesselected in the selection step; and an encoding step of encoding thedigital signal using said code table determined in the determinationstep.
 2. The encoding method as set forth in claim 1, wherein thedigital signal has undergone frequency conversion.
 3. The encodingmethod as set forth in claim 2, wherein, in the selection step, a groupof code tables is selected according to tonality of the digital signal.4. The encoding method as set forth in claim 1, wherein, in theselection step, a single group of code tables is selected in therespective plural predetermined units.
 5. The encoding method as setforth in claim 1, wherein, in the encoding step, an index indicative ofa group of code tables selected in the selection step is furtherencoded.
 6. An encoding method for encoding a digital signal using asingle code table in respective predetermined units, comprising thesteps of: a set-up step of setting up a number of selectable code tablesclassified into a plurality of code tables; a step of selecting one ofthe groups of code tables as containing a code table to be used; aselection step of selecting a single code table from a group of codetables; and an encoding step of encoding the digital signal using a codetable selected in the selection step.
 7. The encoding method as setforth in claim 6, wherein, in the encoding step, an index of a codetable selected in the selection step is encoded under variable codewordlength coding.
 8. The encoding method as set forth in claim 6, wherein,in the encoding step, the number of selectable code tables set up in theset-up step is further encoded.
 9. The encoding method as set forth inclaim 6, wherein, in the set-up step, the number of selectable codetables is set up based on a predetermined set-up signal.
 10. An encodingapparatus for encoding a digital signal using a single code table inrespective predetermined units, comprising: identifying means foridentifying the property of the digital signal; selection means forselecting a single group of code tables from a plurality of previouslyclassified groups of code tables according to the property of thedigital signal; determination means for determining a single code tablefrom the group of code tables selected by the selection means; andencoding means for encoding the digital signal using the code tabledetermined by the determination means.
 11. The encoding apparatus as setforth in claim 10, wherein the digital signal is a signal resulting froma frequency conversion process.
 12. The encoding apparatus as set forthin claim 11, wherein the selection means selects the group of codetables according to tonality of the digital signal.
 13. The encodingapparatus as set forth in claim 10, wherein the selection means selectsa single group of code tables in the respective plural predeterminedunits.
 14. The encoding apparatus as set forth in claim 10, wherein theencoding means further encodes an index indicative of the group of codetables selected by the selection means.
 15. An encoding apparatus forencoding a digital signal using a single code table in respectivepredetermined units, comprising: identifying means for identifying theproperty of the digital signal; set-up means for setting up the numberof selectable code tables classified into groups of code tables;selection means for selecting one of the programs of code tables andthen a single code table from the group of code tables; and encodingmeans for encoding the digital signal using the code table selected bythe selection means.
 16. The encoding apparatus as set forth in claim15, wherein the encoding means encodes an index of the code tableselected by the selection means under variable codeword length coding.17. The encoding apparatus as set forth in claim 15, wherein theencoding means further encoded the number of selectable code tables setup by the set-up means.
 18. The encoding apparatus as set forth in claim15, wherein the set-up means sets up the number of selectable codetables based on the predetermined set-up signal.
 19. A program formaking a computer carry out an encoding processing of encoding a digitalsignal using a single code table in respective predetermined units, theprocessing comprising the steps of: identifying a property of thedigital signal; a selection step of selecting, according to the propertyof the digital signal, a single group of code tables from a plurality ofgroups of code tables classified in advance; a determination step ofdetermining a single code table from a group of code tables selected inthe selection step; and an encoding step of encoding the digital signalusing a code table determined in the determination step.
 20. A programfor making a computer carry out an encoding processing of encoding adigital signal using a single code table in respective predeterminedunits, the processing comprising the steps of: a set-up step of settingup the number of selectable code tables classified into groups of codetables; a selection step of selecting one of said groups of code tablesand then a single code table from a group of code tables; and anencoding step of encoding the digital signal using a code table selectedin the selection step.
 21. A recording medium having recorded therein aprogram which can be read out by a computer, the program making acomputer carry out an encoding processing of encoding a digital signalusing a single code table in respective predetermined units, theprocessing comprising the steps of: providing a plurality of code tablesclassified into groups; identifying a property of the digital signal; aselection step of selecting a single group of code tables from saidplurality of groups of code tables according to the property of thedigital signal; a determination step of determining a single code tablefrom said single group of code tables selected in the selection step;and an encoding step of encoding the digital signal using said codetable determined in the determination step.
 22. A recording mediumhaving recorded therein a program which can be read out by a computer,the program making a computer carry out an encoding processing ofencoding a digital signal using a single code table in respectivepredetermined units, the processing comprising the steps of: a set-upstep of setting up the number of selectable code tables classified intogroups of code tables; a selection step of selecting one of said groupsof code tables and then a single code table from a group of code tables;and an encoding step of encoding the digital signal using a code tableselected in the selection step.
 23. A decoding method for decoding adigital signal that has been encoded using a single code table inrespective predetermined units, comprising the steps of: providing aplurality of code tables classified into groups; a selection step ofselecting a single group of code tables to be used from said pluralityof groups of code tables; a determination step of determining a singlecode table to be used from said single group of code tables selected inthe selection step; and a decoding step of decoding the digital signalusing said code table determined in the determination step.
 24. Thedecoding method as set forth in claim 23, wherein the digital signal hasundergone frequency conversion.
 25. The decoding method as set forth inclaim 24, wherein, in the selection step, a group of code tables, beingthe same as what has been selected according to tonality of the digitalsignal in encoding the digital signal, is selected.
 26. The decodingmethod as set forth in claim 23, wherein, in the selection step, asingle group of code tables is selected in the respective pluralpredetermined units.
 27. The decoding method as set forth in claim 23,wherein, in the selection step, a group of code tables is selected basedon an index indicative of a used group of code tables.
 28. A decodingmethod for decoding a digital signal that has been encoded using asingle code table in respective predetermined units, comprising thesteps of: a set-up step of setting up the number of code tablesclassified into groups of code tables; a step of selecting one of thegroups of code tables; a selection step of selecting a single code tablefrom a group of code tables; and a decoding step of decoding the digitalsignal based on a code table selected in the selection step.
 29. Thedecoding method as set forth in claim 28, wherein, in the selectionstep, a code table to be used is selected based on an index of the codetable which has been encoded under variable codeword length coding. 30.The decoding method as set forth in claim 28, wherein, in the set-upstep, the number of code tables is set up based on the number of codetables which has been encoded together with the digital signal.
 31. Adecoding apparatus for decoding a digital signal that has been encodedusing a single code table in respective predetermined units, comprising:selection means for selecting a single group of code tables to be usedfrom a plurality of previously classified groups of code tables;determination means for determining a single code table to be used fromthe group of code tables selected by the selection means; and decodingmeans for decoding the digital signal using the code table determined bythe determination means.
 32. The decoding apparatus as set forth inclaim 31, wherein the digital signal is a signal resulting from afrequency conversion process.
 33. The decoding apparatus as set forth inclaim 32, wherein the selection means selects the group of code tablesbeing the same as what has been selected according to tonality of thedigital signal in encoding the digital signal.
 34. The decodingapparatus as set forth in claim 31, wherein the selection means selectsa single group of code tables in the respective plural predeterminedunits.
 35. The decoding apparatus as set forth in claim 31, wherein theselection means selects a group of code tables based on an indexindicative of the used group of code tables.
 36. A decoding apparatusfor decoding a digital signal that has been encoded using a single codetable in respective predetermined units, comprising: a set-up means forsetting up the number of code tables classified into groups of codetables; a selection means for selecting one of the groups of code tablesand then a single code table from a group of code tables; and a decodingmeans for decoding the digital signal based on a code table selected bythe selection means.
 37. The decoding apparatus as set forth in claim36, wherein the selection means selects a code table to be used based onan index of a code table which has been encoded under variable codewordlength coding.
 38. The decoding apparatus as set forth in claim 36,wherein the set-up means sets up the number of code tables based on thenumber of code tables which has been encoded together with the digitalsignal.
 39. A program for making a computer carry out a decodingprocessing of decoding a digital signal that has been encoded using asingle code table in respective predetermined units, the processingcomprising the steps of: a selection step of selecting a single group ofcode tables to be used from a plurality of groups of code tablesclassified in advance; a determination step of determining a single codetable to be used from a group of code tables selected in the selectionstep; and a decoding step of decoding the digital signal using a codetable determined in the determination step.
 40. A program for making acomputer carry out a decoding processing of decoding a digital signalthat has been encoded using a single code table in respectivepredetermined units, the processing comprising the steps of: a set-upstep of setting up the number of code tables classified into groups ofcode tables; a selection step of selecting one of the groups of codetables and then a single code table from a group of code tables; and adecoding step of decoding the digital signal based on a code tableselected in the selection step.
 41. A recording medium having recordedtherein a program which can be read out by a computer, the programmaking a computer carry out a decoding processing of decoding a digitalsignal that has been encoded using a single code table in respectivepredetermined units, the processing comprising the steps of: providing aplurality of code tables classified into groups; a selection step ofselecting a single group of code tables to be used from said pluralityof groups of code tables; a determination step of determining a singlecode table to be used from said single group of code tables selected inthe selection step; and a decoding step of decoding the digital signalusing said code table determined in the determination step.
 42. Arecording medium having recorded therein a program which can be read outby a computer, the program making a computer carry out a decodingprocessing of decoding a digital signal that has been encoded using asingle code table in respective predetermined units, the processingcomprising the steps of: a set-up step of setting up the number of codetables classified into groups of code tables; a selection step ofselecting one of the groups of code tables and then a single code tablefrom a group of code tables; and a decoding step of decoding the digitalsignal based on a code table selected in the selection step.